
using System;
using System.Collections.Generic;
using UnityEngine;

public class BaseModel : ScriptableObject
{
    public virtual void editor检查数据()
    {
        Debug.Log("检查数据");
    }
    
}


public class BaseModel<T> : BaseModel where T: IModelData<T>
{
    [SerializeField] protected List<T> Datas;

    public  List<T> GetCopyData()
    {
        List<T> res = new List<T>();
        foreach (var VARIABLE in Datas)
        {
            res.Add(VARIABLE.Copy());
        }
        return res;
    }

    public void AddData(List<T> ddd)
    {
        Datas.AddRange(ddd);
    }
}


public interface IModelData<T>
{
    T Copy();
}



public class DataAttribute : Attribute
{
    public string FileName;
    public string FileName2;
    
    public DataAttribute(string path)
    {
        FileName = path;
    }
    public DataAttribute(string path,string 文件2): this(path)
    {
        FileName2 = 文件2;
    }
}
